#pragma once

// Compiler-specific workarounds
// Rationale:  Since we're maintaining two different versions of the project
// for different versions of Visual C++, we need to ensure the same code compiles
// for each version.  Here, Visual Studio 2010 does the foreach-idiom differently
// than C++11-supporting compilers, such as GCC and Visual Studio 2012.

// Incompatible for-each syntax between 2010 and 2012 versions of Visual Studio:
#if defined(_MSC_VER) && _MSC_VER >= 1500 && _MSC_VER < 1700
// Visual C++ 2008 and Visual C++ 2010
#define FOR( expr, container )		for each ( expr in container )
#else
// Visual C++ 2012 and other (assuming) C++11 compliant compilers
#define FOR( expr, container )		for ( expr : container )
#endif

// _MSC_VER, version of C++ compiler.
// List of versions here:  http://stackoverflow.com/questions/70013/how-to-detect-if-im-compiling-code-under-visual-studio-8


// Also, nyan cat:
// 
// +      o     +              o   
//     +             o     +       +
// o          +
//     o  +           +        +
// +        o     o       +        o
// -_-_-_-_-_-_-_,------,      o 
// _-_-_-_-_-_-_-|   /\_/\  
// -_-_-_-_-_-_-~|__( ^ .^)  +     +  
// _-_-_-_-_-_-_-""  ""      
// +      o         o   +       o
//     +         +
// o        o         o      o     +
//     o           +
// +      +     o        o      +    
//
//